percentrange (parameter type)

A range of percentages can be specified with type="percentrange" in the parameter definition:

    {name="MyPercentRange", type="percentrange", default={20,80}}

The range is represented by a slider in the user interface, with two handles for adjusting the upper and lower percentages:

../../../_images/ui-percentrange-parameter.png

The current range is accessed via self.parameters in the execute method, which provides a Lua array with two Lua numbers:

  local myPercentRange = self.parameters.MyPercentRange
  local lowerPercentage = myPercentRange[1]
  local upperPercentage = myPercentRange[2]